package com.airlenet.dubbo.registry.hazelcast;

import com.hazelcast.core.Hazelcast;
import com.hazelcast.core.HazelcastInstance;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.registry.support.AbstractRegistryFactory;

public class HazelcastRegistryFactory  extends AbstractRegistryFactory {

    private HazelcastInstance hazelcastInstance;

    public void setHazelcastInstance(HazelcastInstance hazelcastInstance) {
        this.hazelcastInstance = hazelcastInstance;
    }

    @Override
    protected HazelcastRegistry createRegistry(URL url) {
        return new HazelcastRegistry(url,hazelcastInstance);
    }
}
